body {
  margin: 0;
  font-family: 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif;
  background: #f0f2f5;
  color: #333;
  width: 100%;
  overflow-x: hidden;
}
#app {
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  box-shadow: none;
  overflow: hidden;
}
header {
  background: none;
  box-shadow: none;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  position: absolute;
  width: 100%;
  max-width: 480px;
  z-index: 10;
}
main, .page {
  padding: 0 1rem;
  padding-top: 1rem;
  padding-bottom: 5rem;
  box-sizing: border-box;
  background: #f8f8f8;
}
.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  border: 1px solid #eee;
}
.card h2, .card h3, .virtual-avatar-section h3, .quick-intervention-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: #555;
}
.card h2 i {
  margin-right: 0.5rem;
}
.card p {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  line-height: 1.6;
  color: #555;
}
.card button {
  background: #4a90e2;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  margin-top: 0.5rem;
  width: auto;
  min-width: 120px;
  cursor: pointer;
  transition: background 0.3s ease;
}
.card button:hover {
  background: #357ABD;
}
.card button:active {
  background: #2b6ca2;
}
footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid #eee;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
  padding: 0.5rem 0;
  padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
}
footer nav {
  display: flex;
  justify-content: space-around;
  padding: 0 1rem;
}
footer button {
  background: none;
  border: none;
  color: #888;
  font-size: 0.9rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem;
  cursor: pointer;
  flex: 1;
}
footer button i {
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}
footer button span {
  font-size: 0.8rem;
}
footer button:hover,
footer button.active {
  color: #4a90e2;
}
.analysis-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}
.analysis-title {
  font-weight: bold;
  color: #4a90e2;
  margin: 1rem 0 0.5rem 0;
  font-size: 1.1rem;
}
.analysis-title i {
  margin-right: 0.5rem;
}
.analysis-group button {
  background: #eaf2ff;
  color: #4a90e2;
  border: 1px solid #a8c9ff;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  margin: 0;
  text-align: left;
  transition: background 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  display: flex;
  align-items: center;
}
.analysis-group button i {
  margin-right: 0.5rem;
}
.analysis-group button span {
  /* 如果需要，可以调整span的样式 */
}
.analysis-group button:hover {
  background: #d0e3ff;
}
.analysis-group button:active {
  background: #a8c9ff;
}
@media (max-width: 480px) {
  #app { max-width: 100%; }
  footer { max-width: 100%; }
}

/* 确保图片、表格等内容不会超出容器 */
img,
table,
textarea,
video,
iframe,
canvas,
blockquote,
pre,
code {
  max-width: 100%;
  box-sizing: border-box;
}

/* 顶部用户信息区域 */
.top-user-section {
  background: linear-gradient(135deg, #8a2be2 0%, #4169e1 100%);
  padding: 4rem 1rem 6rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: #fff;
  position: relative;
  margin-bottom: -4rem;
  z-index: 5;
}

.top-user-section .avatar {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.8rem;
}

.top-user-section .username {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  font-weight: bold;
}

.top-user-section .feeling-prompt {
  margin: 0;
  font-size: 1.3rem;
}

/* 实时情绪状态卡片 */
.emotion-status-card {
  position: relative;
  margin: -4rem 1rem 1.5rem 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  padding: 1.5rem;
  z-index: 8;
}

.emotion-status-card .status-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.5rem;
}

.emotion-status-card .emotion-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.emotion-status-card .emotion-text {
  font-size: 1.2rem;
  font-weight: bold;
  color: #333;
}

.emotion-status-card .emotion-intensity {
  font-size: 0.9rem;
  color: #555;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.emotion-status-card .progress-bar-container {
  flex: 1;
  background: #eee;
  border-radius: 4px;
  height: 8px;
  margin: 0;
  overflow: hidden;
}

.emotion-status-card .progress-bar {
  height: 100%;
  background: #4a90e2;
  border-radius: 4px;
}

/* 虚拟形象互动区域 */
.virtual-avatar-section {
  padding: 0 1rem 1.5rem 1rem;
}

.virtual-avatar-section h3 {
  margin: 0 0 1rem 0;
  font-size: 1rem;
  color: #555;
}

.virtual-avatar-section .interaction-cards-container {
  display: flex;
  gap: 1rem;
}

.virtual-avatar-section .interaction-card {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* 为新增的图标设置样式 */
.virtual-avatar-section .interaction-card i {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    color: #4a90e2;
}

.virtual-avatar-section .interaction-card h4 {
  margin: 0 0 0.3rem 0;
  font-size: 0.95rem;
  color: #333;
}

.virtual-avatar-section .interaction-card p {
  margin: 0;
  font-size: 0.8rem;
  color: #888;
}

/* 虚拟形象互动卡片内部按钮样式 */
.virtual-avatar-section .interaction-card button {
    background: #eaf2ff;
    color: #4a90e2;
    border: 1px solid #a8c9ff;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    margin-top: 0.8rem;
    cursor: pointer;
    transition: background 0.3s ease;
     width: auto;
     flex-shrink: 0;
}
.virtual-avatar-section .interaction-card button:hover {
    background: #d0e3ff;
}
.virtual-avatar-section .interaction-card button:active {
    background: #a8c9ff;
}

/* 快速干预区域样式 */
.quick-intervention-section {
     padding: 1rem 1rem 6rem 1rem;
}
.quick-intervention-section h3 {
     margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #555;
}

.quick-links {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
     flex-wrap: wrap;
}

.quick-links button {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    color: #4a90e2;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.85rem;
    cursor: pointer;
     flex: 1;
     min-width: 60px;
     padding: 0.8rem 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.quick-links button i {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.quick-links button span {
    font-size: 0.8rem;
}

.quick-links button:hover {
    background: #eaf2ff;
    border-color: #a8c9ff;
    color: #357ABD;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.quick-links button:active {
    background: #d0e3ff;
    border-color: #4a90e2;
     box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

/* 新增功能列表样式 */
.function-list {
    margin-bottom: 1.5rem;
}

.function-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.function-item:last-child {
    border-bottom: none;
}

.function-item h4 {
    margin: 0 0 0.3rem 0;
    font-size: 1rem;
    color: #333;
}

.function-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #888;
}

/* 调整卡片h3样式 */
.card h3 {
    margin: 0 0 1rem 0;
    font-size: 1rem;
    color: #555;
}

/* Placeholder Area Styles */
.placeholder-area {
    width: 100%;
    height: 150px;
    background: #eee;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #888;
    font-size: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
}

.video-placeholder {
    background: #333;
    color: #fff;
}

.achievements-placeholder {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    height: auto;
    padding: 1rem;
}

.achievement-badge {
    font-size: 2rem;
    color: #ffc107;
}

.leaderboard-placeholder {
    height: 100px;
}


/* Intervention List Styles */
.intervention-list .intervention-item {
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.intervention-list .intervention-item:last-child {
    border-bottom: none;
}

.intervention-list .intervention-item h4 {
    margin: 0 0.5rem 0 0;
    font-size: 1rem;
    color: #333;
    display: flex;
    align-items: center;
}

.intervention-list .intervention-item h4 i {
    margin-right: 0.5rem;
    color: #4a90e2;
}

.intervention-list .intervention-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #888;
    flex-grow: 1;
}

.intervention-list .intervention-item button {
     background: #4a90e2;
     color: #fff;
     border: none;
     border-radius: 4px;
     padding: 0.5rem 1rem;
     font-size: 0.9rem;
     cursor: pointer;
     transition: background 0.3s ease;
     flex-shrink: 0;
}
.intervention-list .intervention-item button:hover {
    background: #357ABD;
}
.intervention-list .intervention-item button:active {
    background: #2b6ca2;
}


/* Growth Section Styles */
.growth-section .achievement-badge {
    /* Style already defined in placeholder-area styles */
}


/* My Section Styles */
.my-section button {
     background: #4a90e2;
     color: #fff;
     border: none;
     border-radius: 4px;
     padding: 0.5rem 1rem;
     font-size: 0.9rem;
     cursor: pointer;
     transition: background 0.3s ease;
     margin-top: 0.8rem;
}
.my-section button:hover {
    background: #357ABD;
}
.my-section button:active {
    background: #2b6ca2;
} 